set(CMAKE_SYSTEM_NAME "Generic")

# search for programs in the build host directories
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
# for libraries and headers in the target directories
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

# where is the target environment 
SET(CMAKE_FIND_ROOT_PATH  /usr/local/share/cross-compilers/TMS320C6x/6.1.13)

# specify the cross compiler
SET(CMAKE_C_COMPILER   /usr/local/share/cross-compilers/TMS320C6x/6.1.13/bin/cl6x)
SET(CMAKE_CXX_COMPILER /usr/local/share/cross-compilers/TMS320C6x/6.1.13/bin/cl6x)
SET(CMAKE_C_ARCHIVE    /usr/local/share/cross-compilers/TMS320C6x/6.1.13/bin/ar6x)
SET(CMAKE_CXX_ARCHIVE  /usr/local/share/cross-compilers/TMS320C6x/6.1.13/bin/ar6x)
SET(CMAKE_AR           /usr/local/share/cross-compilers/TMS320C6x/6.1.13/bin/ar6x)
SET(CMAKE_HEX          /usr/local/share/cross-compilers/TMS320C6x/6.1.13/bin/hex6x)
SET(CMAKE_STRIP        /usr/local/share/cross-compilers/TMS320C6x/6.1.13/bin/strip6x)
SET(CMAKE_RANLIB       "")

include_directories(/usr/local/share/cross-compilers/TMS320C6x/6.1.13/include)
link_directories(/usr/local/share/cross-compilers/TMS320C6x/6.1.13/lib)

set(CMAKE_USER_MAKE_RULES_OVERRIDE SBE/toolchains/ti/flags)
